package com.zyk.leetcode;

/**
 * @author zhangsan
 * @date 2021/4/3 20:04
 */
public class J05 {

    /** https://leetcode-cn.com/problems/ti-huan-kong-ge-lcof/ */
    public static String replaceSpace(String s) {
        return s.replaceAll(" ", "%20");
    }

    // for test
    public static void main(String[] args) {
        String str = "We are happy.";
        System.out.println(replaceSpace(str));
    }

}
